<template>
   <div class="all">
     <header>
       <div class="div">
         <img src="../../../assets/返回.png" @click="back()" alt="">
         <span class="solid" @click="back()">返回</span>
       </div>
       <div class="div">
         <span>系统消息</span>
       </div>
       <div class="div">
         <span class="solid"></span>
       </div>
     </header>
     <div class="box">
       <div class="top">{{item.sys_msg_title}}</div>
       <div class="content">{{item.sys_msg_content}}</div>
       <div class="bottom">{{item.date}} {{item.time}}</div>
     </div>
   </div>
</template>

<script>
export default {
  name: 'SysInfo',
  data () {
    return {
      item: ''
    }
  },
  mounted () {
    if (sessionStorage.getItem('SysInfoData') !== null) {
      this.item = JSON.parse(sessionStorage.getItem('SysInfoData'))
    }
  },
  methods: {
    back () {
      this.$router.history.go(-1)
    }
  },
  destroyed () {
    sessionStorage.removeItem('SysInfoData')
  }
}
</script>

<style scoped >
  .all{
    width: 100%;
    height: 100%;
    background: #FAF9FE;
    overflow: auto;
  }
  header{
   width: 100%;
   height: 44px;
   display: flex;
   align-items: center;
   border-bottom: 1px solid #E5E5E5;
   background: white;
   position: sticky;
   top: 0;
   z-index: 9;
  }
  .div{
   width: 33%;
   height: 100%;
   display: flex;
   align-items: center;
   font-family: "PingFang SC";
   font-size: 15px;
   font-weight: bold;
  }
  .div img{
   margin-right: 5px;
  }
  .div:nth-child(1) img{
   height: 13px;
   width: 7px;
   margin-left: 15px;
  }
  .div:nth-child(3) img{
   margin-right: 5px;
  }
  .div:nth-child(3) span{
   margin-right: 15px;
  }
  .div:nth-child(2){
   justify-content: center;
  }
  .div:nth-child(3){
   justify-content: flex-end;
  }
  .solid{
   color: #1DA4F2;
  }
  .box{
    width: 95%;
    padding: 10px;
    box-sizing: border-box;
    box-shadow: 0px 5px 20px 0px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    margin: 10px auto auto auto;
    display: flex;
    flex-direction: column;
    background: white;
  }
  .top{
    font-size: 15px;
    font-family: PingFang SC;
    font-weight: bold;
    color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .content{
    font-family: PingFang SC;
    font-weight: 500;
    color: #666666;
    font-size: 13px;
    padding: 8px 0;
    box-sizing: border-box;
  }
  .bottom{
    font-size: 13px;
    font-family: PingFang SC;
    font-weight: 500;
    color: #999999;
    display: flex;
    justify-content: flex-end;
  }
</style>
